<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    .box{
      margin: 200px;
      height: 200px;
      width: 200px;
      background-color: #ff4af4;
    }
  </style>
</head>
<body>
<div class="box"></div>
<script>
  var box = document.querySelector('.box');

  box.addEventListener('mousemove', function (e) {
    var x = e.pageX - box.offsetLeft;
    var y = e.pageY - box.offsetTop;

    box.innerHTML = '(' + x + ',' + y + ')';
  })
</script>
</body>
</html>